package com.kun.portal.webframe.dao;

import com.kun.portal.webframe.po.AppointmentPo;
import com.kun.portal.webframe.po.EquipmentPo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import javax.persistence.NamedAttributeNode;
import javax.persistence.NamedEntityGraph;
import java.util.List;

/**
 * Created by Administrator on 2018/7/6.
 */
public interface EquipmentDao  extends JpaRepository<EquipmentPo, String>, JpaSpecificationExecutor<EquipmentPo> {
    @EntityGraph(value="lazy",type= EntityGraph.EntityGraphType.FETCH)
    public Page<EquipmentPo> findAll(Pageable pageable);
    @EntityGraph(value="lazy",type= EntityGraph.EntityGraphType.FETCH)

    public Page<EquipmentPo> findAll( Specification<EquipmentPo> specification,Pageable pageable);
}
